import { StyleModule } from '../../../../../../lib/abstract'
import { DEFAULT_COPY_BUTTON_ID } from '../../../../content/copy_protection'

export class ZhiHuStyle extends StyleModule {
  private static instance: ZhiHuStyle

  readonly GLOBAL_STYLE: string = `
/* 代码块头部容器 */    
.code-block-divider {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  background-color: transparent !important;
  margin: 0;
  height: 35px !important;
  
  /* 代码语言 */
  .code-block-extension-lang {
    font-size: 14px !important;
    user-select: none !important;
  }
  
  /* 复制代码按钮 */
  #${DEFAULT_COPY_BUTTON_ID} {
    user-select: none !important;
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: center;
    padding: 4px;
    .btn-text {
      display: inline-block;
      font-size: 14px !important;
      white-space: nowrap;
    }
  }
}
  `

  /**
   * 获取单例实例
   */
  public static getInstance(): ZhiHuStyle {
    if (!ZhiHuStyle.instance) {
      ZhiHuStyle.instance = new ZhiHuStyle()
    }
    return ZhiHuStyle.instance
  }
}
